define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {


    var Controller = {

        examine: function () {
            Controller.api.bindevent();
        },
        edit: function () {
            Controller.api.bindevent();
        },
        api: {
            bindevent: function () {

                const q = {};
                location.search.replace(/([^?&=]+)=([^&]+)/g,function(_,k,v){q[k]=v});

                Form.api.bindevent($("form[role=form]"),function(data,ret){
                    if (q.noreload == 1) {
                        Fast.api.close(data);//这里是重点
                    } else {
                        parent.location.reload();
                    }
                });
            },
        }
    };
    return Controller;
});